#!/usr/bin/env python3

def test1():
    num = [1,2,3,4]
    for i in num:
        for j in num:
            for k in num:
                for l in num:
                    if (i!=j) and (i!=k) and (i!=l) and (j!=k) and (j!=l):
                        print (i,j,k,l)

if __name__ == '__main__':
    print('000')
    test1()